import {
	LoginPostAction,
	getAction,
	postAction,
	putAction,
	deleteAction
} from "./request";
// 1代表后端接收单参数 默认是2可不写
// 登录
const Login = (data) => LoginPostAction("/login", data);
//获取当前登录用户信息
const GetInfo = (token) => getAction("/getInfo", null, token);
//工单信息-获取
const OrderList = (data) => getAction("/wo/order/list", data);


//获取车辆使用信息列表
const UserList = (data) => getAction("/basic/vehicle/use/list", data);
//借车
const UserBorrow = (data) => putAction("/basic/vehicle/use/borrow", data);
//还车
const UserBack = (data) => putAction("/basic/vehicle/use/back", data);
//获取车辆信息
const VehicleList = (data) => getAction("/basic/vehicle/list", data);
//获取岗位列表
const PostList = (data) => getAction("/system/post/list/nopager", data);
//查询人员上岗信息（不分页）
const PostListWorking = (data) => getAction("/system/user/post/list/working", data);
//查询当天工单完成情况
const TodaySum = (data) => getAction("/wo/order/today/sum", data);
//修改密码
const UpdatePwd = (data) => putAction("/system/user/profile/updatePwd", data, 1);
//上岗
const UserPostGo = (data) => postAction("/system/user/post/go", data);
//下岗
const UserPostOff = (data) => putAction("/system/user/post/off", data);
//工单信息-核料完成
const OrderCheck = (data) => putAction("/wo/order/check", data);
//工单信息-取件完成
const OrderReceive = (data) => putAction("/wo/order/receive", data);
//工单信息-配送完成
const OrderSend = (data) => putAction("/wo/order/send", data);
//工单信息-备料完成
const OrderPlan = (data) => putAction("/wo/order/plan", data);
//工单信息-退回工单池
const OrderBack = (data) => putAction("/wo/order/back", data);

//工单池
const OrderSum = (data) => getAction("/wo/order/sum", data);
//获取单个工单信息
const OneWoOrder = (data) => getAction("/wo/order/" + data);
//工单信息-转交/领取
const OrderTurn = (data) => putAction("/wo/order/turn", data);
//工单信息-转交/领取
const MsgAxisList = (data) => getAction("/msg/axis/list/" + data);
//补充附件
const attach_batch = (data) => postAction("/wo/order/attach/batch", data);

const attach_list = (data) => getAction("/wo/attach/list" + data);
//字典
const Dist_Data_Type = (data) => getAction("/system/dict/data/type/" + data);
export {
	Login,
	GetInfo,
	OrderList,
	UserList,
	UserBorrow,
	UserBack,
	VehicleList,
	PostList,
	TodaySum,
	UpdatePwd,
	Dist_Data_Type,
	UserPostGo,
	PostListWorking,
	UserPostOff,
	OrderCheck,
	OrderBack,
	OrderReceive,
	OrderSend,
	OrderSum,
	OneWoOrder,
	OrderPlan,
	OrderTurn,
	MsgAxisList,
	attach_list,
	attach_batch
}
